home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / ATSUnicode.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  28.7 KB  |  495 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        ATSUnicode.p
  3.  
  4.      Contains:    Public interfaces for Apple Type Services for Unicode Imaging
  5.  
  6.      Version:    Technology:    Allegro
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT ATSUnicode;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __ATSUNICODE__}
  27. {$SETC __ATSUNICODE__ := 1}
  28.  
  29. {$I+}
  30. {$SETC ATSUnicodeIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __ATSLAYOUTTYPES__}
  34. {$I ATSLayoutTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __SFNTLAYOUTTYPES__}
  37. {$I SFNTLayoutTypes.p}
  38. {$ENDC}
  39.  
  40. {$IFC UNDEFINED __MACTYPES__}
  41. {$I MacTypes.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __QUICKDRAW__}
  44. {$I Quickdraw.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __TEXTCOMMON__}
  47. {$I TextCommon.p}
  48. {$ENDC}
  49.  
  50.  
  51. {$PUSH}
  52. {$ALIGN MAC68K}
  53. {$LibExport+}
  54.  
  55. {**********}
  56. {    Types    }
  57. {**********}
  58.  
  59. TYPE
  60.     UniCharArrayHandle                    = ^UniCharArrayPtr;
  61. {
  62.       UniCharArrayHandle is a handle type to correspond to 
  63.       UniCharArrayPtr, defined in Unicode.h.  It refers 
  64.       to a handle, interpreted as a pointer to an array 
  65.       of UniChar's (UInt16's).
  66. }
  67.     UniCharArrayOffset                    = UInt32;
  68. {
  69.       UniCharArrayOffset is used to indicate an offset 
  70.       into an array of UniChar's (UInt16's).  
  71. }
  72.     ATSUTextMeasurement                    = Fixed;
  73. {
  74.       ATSUTextMeasurement is exactly what its name implies:  
  75.       a measurement of the size in some direction of text:  
  76.       height, width, ascent, descent, and so on.  
  77. }
  78.     ATSUFontID                            = UInt32;
  79. {
  80.       ATSUFontID indicates a particular font family and face.  
  81.       ATSUFontID's are not guaranteed to remain constant across 
  82.       reboots.  Clients should use the font's unique name to 
  83.       get a font token to store in documents which is 
  84.       guaranteed to remain constant across reboots. 
  85. }
  86.     ATSUFontFeatureType                    = UInt16;
  87.     ATSUFontFeatureSelector                = UInt16;
  88. {
  89.       ATSUFontFeatureType and ATSUFontFeatureSelector are used 
  90.       to identify font features.  
  91. }
  92.     ATSUFontVariationAxis                = FourCharCode;
  93.     ATSUFontVariationValue                = Fixed;
  94. {
  95.       ATSUFontVariationAxis and ATSUFontVariationValue are used 
  96.       in connection with font variations.  
  97. }
  98.     ATSUTextLayout = ^LONGINT;
  99. {
  100.       ATSUTextLayout is used to store the attribute information 
  101.       associated with a contiguous block of UniChar's (UInt16's) 
  102.       in memory.  It's typed to be an opaque structure.  
  103. }
  104.     ATSUStyle = ^LONGINT;
  105. {
  106.       ATSUStyle is used to store a set of individual attributes, 
  107.       font features, and font variations.  It's typed to be 
  108.       an opaque structure.  
  109. }
  110.     ATSUAttributeTag                    = UInt32;
  111. {
  112.       ATSUAttributeTag is used to indicate the particular type 
  113.       of attribute under consideration:  font, size, color, 
  114.       and so on.  
  115.       Each style run may have at most one attribute with a 
  116.       given ATSUAttributeTag (i.e., a style run can't have 
  117.       more than one font or size) but may have none.  
  118. }
  119.     ATSUAttributeValuePtr                = Ptr;
  120. {
  121.       ATSUAttributeValuePtr is used to provide generic access 
  122.       to storage of attribute values, which vary in size.
  123. }
  124.     ATSUAttributeInfoPtr = ^ATSUAttributeInfo;
  125.     ATSUAttributeInfo = RECORD
  126.         fTag:                    ATSUAttributeTag;
  127.         fValueSize:                ByteCount;
  128.     END;
  129.  
  130. {
  131.       ATSUAttributeInfo is used to provide a tag/size pairing.  
  132.       This makes it possible to provide the client information   
  133.       about all the attributes for a given range of text.  This   
  134.       structure is only used to return to the client information   
  135.       about a complete set of attributes.  An array of   
  136.       ATSUAttributeInfos is passed as a parameter so that the   
  137.       client can find out what attributes are set and what their   
  138.       individual sizes are; with that information, they can then   
  139.       query about the values of the attributes they're interested   
  140.       in.  Because arrays of ATSUAttributeInfos are used as parameters   
  141.       to functions, they have to be of a fixed size, hence the   
  142.       value is not included in the structure.  
  143. }
  144.     ATSUCaretPtr = ^ATSUCaret;
  145.     ATSUCaret = RECORD
  146.         fX:                        Fixed;
  147.         fY:                        Fixed;
  148.         fDeltaX:                Fixed;
  149.         fDeltaY:                Fixed;
  150.     END;
  151.  
  152. {
  153.       ATSUCaret contains the complete information needed to render a
  154.       caret.  fX and fY is the position of one of the caret's ends
  155.       relative to the origin position of the line the caret belongs.
  156.       fDeltaX and fDeltaY is the position of the caret's other end.
  157.       Hence, to draw a caret, simply call MoveTo(fX, fY) followed by
  158.       LineTo(fDeltaX, fDeltaY) or equivalent.  The ATSUCaret will
  159.       contain the positions needed to draw carets on angled lines
  160.       and reflect angled carets and leading/trailing split caret
  161.       appearances.
  162. }
  163.     ATSUCursorMovementType                = LONGINT;
  164. {
  165.       ATSUCursorMovementType currently can take three values 
  166.       (kATSUByCharacter, kATSUByCluster, and kATSUByWord) 
  167.       and is used to indicate how much to move the cursor.  
  168. }
  169.     ATSUVerticalCharacterType            = UInt16;
  170. {
  171.       ATSUVerticalCharacterType currently can take two values 
  172.       (kATSUStronglyVertical, and kATSUStronglyHorizontal) and 
  173.       is used to indicate whether text is to be laid out as 
  174.       vertical glyphs or horizontal glyphs.  
  175. }
  176.     ATSUStyleComparison                    = UInt16;
  177. {
  178.       ATSUStyleComparison is an enumeration with four values 
  179.       (kATUStyleUnequal, ATSUStyleContains, kATSUStyleEquals, 
  180.       and kATSUStyleContainedBy), and is used by ATSUCompareStyles() 
  181.       to indicate if the first style parameter contains as a 
  182.       proper subset, is equal to, or is contained by the second 
  183.       style parameter.
  184. }
  185. {**************************************************}
  186. {    Gestalt selectors                                }
  187. {        Move into Gestalt.i when they're stable!!!!    }
  188. {**************************************************}
  189.  
  190. CONST
  191.     gestaltATSUVersion            = 'uisv';
  192.     gestaltATSUFeatures            = 'uisf';
  193.  
  194.     gestaltOriginalATSUVersion    = $00010000;
  195.  
  196. {**************}
  197. {    Error codes    }
  198. {**************}
  199.     kATSUInvalidTextLayoutErr    = -8790;                        {     An attempt was made to use a ATSUTextLayout  }
  200.                                                                 {     which hadn't been initialized or is otherwise  }
  201.                                                                 {     in an invalid state.  }
  202.     kATSUInvalidStyleErr        = -8791;                        {     An attempt was made to use a ATSUStyle which   }
  203.                                                                 {     hadn't been properly allocated or is otherwise   }
  204.                                                                 {     in an invalid state.   }
  205.     kATSUInvalidTextRangeErr    = -8792;                        {     An attempt was made to extract information    }
  206.                                                                 {     information from or perform an operation on a    }
  207.                                                                 {     ATSUTextLayout for a range of text not covered    }
  208.                                                                 {     by the ATSUTextLayout.   }
  209.     kATSUFontsMatched            = -8793;                        {     This is not an error code but is returned by     }
  210.                                                                 {     ATSUMatchFontsToText() when changes need to     }
  211.                                                                 {     be made to the fonts associated with the text.   }
  212.     kATSUFontsNotMatched        = -8794;                        {     This value is returned by ATSUMatchFontsToText()     }
  213.                                                                 {     when the text contains Unicode characters which     }
  214.                                                                 {     cannot be represented by any installed font.   }
  215.     kATSUNoCorrespondingFontErr    = -8795;                        {     This value is retrned by font ID conversion  }
  216.                                                                 {     routines ATSUFONDtoFontID() and ATSUFontIDtoFOND()  }
  217.                                                                 {     to indicate that the input font ID is valid but  }
  218.                                                                 {     there is no conversion possible.  For example,  }
  219.                                                                 {     data-fork fonts can only be used with ATSUI not  }
  220.                                                                 {     the FontManager, and so converting an ATSUIFontID  }
  221.                                                                 {     for such a font will fail.    }
  222.     kATSUInvalidFontErr            = -8796;                        {     Used when an attempt was made to use an invalid font ID. }
  223.     kATSUInvalidAttributeValueErr = -8797;                        {     Used when an attempt was made to use an attribute with  }
  224.                                                                 {     a bad or undefined value.   }
  225.     kATSUInvalidAttributeSizeErr = -8798;                        {     Used when an attempt was made to use an attribute with a  }
  226.                                                                 {     bad size.   }
  227.     kATSUInvalidAttributeTagErr    = -8799;                        {     Used when an attempt was made to use a tag value that }
  228.                                                                 {     was not appropriate for the function call it was used.   }
  229.     kATSUInvalidCacheErr        = -8800;                        {     Used when an attempt was made to read in style data  }
  230.                                                                 {     from an invalid cache.  Either the format of the  }
  231.                                                                 {     cached data doesn't match that used by Apple Type  }
  232.                                                                 {     Services for Unicode™ Imaging, or the cached data  }
  233.                                                                 {     is corrupt.   }
  234.     kATSUNotSetErr                = -8801;                        {     Used when the client attempts to retrieve an attribute,  }
  235.                                                                 {     font feature, or font variation from a style when it  }
  236.                                                                 {     hadn't been set.  In such a case, the default value will }
  237.                                                                 {     be returned for the attribute's value. }
  238.     kATSUNoStyleRunsAssignedErr    = -8802;                        {     Used when an attempt was made to measure, highlight or draw }
  239.                                                                 {     a ATSUTextLayout object that has no styleRuns associated with it. }
  240.                                                                 {     Used when QuickDraw Text encounters an error rendering or measuring }
  241.     kATSUQuickDrawTextErr        = -8803;                        {     a line of ATSUI text. }
  242.  
  243. {*****************************************************************************}
  244. {    ATSUI Attribute tags:  Apple reserves values 0 to 65,535 (0 to 0x0000FFFF) }
  245. {    ATSUI clients may create their own tags with any other value               }
  246. {*****************************************************************************}
  247. {    Line Control Attribute Tags }
  248.     kATSULineWidthTag            = 1;                            {     Type:            ATSUTextMeasurement }
  249.                                                                 {     Default value:    0 }
  250.     kATSULineRotationTag        = 2;                            {     Type:            Fixed (fixed value in degrees in right-handed coordinate system) }
  251.                                                                 {     Default value:    0 }
  252.     kATSULineDirectionTag        = 3;                            {     Type:            Boolean; values 0 or 1 (see below for value identities) }
  253.                                                                 {     Default value:    kATSULeftToRightBaseDirection }
  254.     kATSULineJustificationFactorTag = 4;                        {     Type:            Fract between 0 and 1 }
  255.                                                                 {     Default value:    kATSUNoJustification }
  256.     kATSULineFlushFactorTag        = 5;                            {     Type:            Fract between 0 and 1  }
  257.                                                                 {     Default value:    kATSUStartAlignment }
  258.     kATSULineBaselineValuesTag    = 6;                            {     Type:            BslnBaselineRecord }
  259.                                                                 {     Default value:    All zeros.  Calculated from other style attributes (e.g., font and point size) }
  260.                                                                 {     Type:            UInt32 }
  261.     kATSULineLayoutOptionsTag    = 7;                            {     Default value:    kATSUNoLayoutOptions - other options listed in ATSLayoutTypes.h }
  262.  
  263. {    Run Style Attribute Tags }
  264.                                                                 {  QuickDraw compatibility tags  }
  265.     kATSUQDBoldfaceTag            = 256;                            {     Type:            Boolean     }
  266.                                                                 {     Default value:    false }
  267.     kATSUQDItalicTag            = 257;                            {     Type:            Boolean         }
  268.                                                                 {     Default value:    false }
  269.     kATSUQDUnderlineTag            = 258;                            {     Type:            Boolean     }
  270.                                                                 {     Default value:    false }
  271.     kATSUQDCondensedTag            = 259;                            {     Type:            Boolean     }
  272.                                                                 {     Default value:    false }
  273.     kATSUQDExtendedTag            = 260;                            {     Type:            Boolean     }
  274.                                                                 {     Default value:    false }
  275.                                                                 {  Common run tags  }
  276.     kATSUFontTag                = 261;                            {     Type:            ATSUFontID     }
  277.                                                                 {     Default value:    GetScriptVariable( smSystemScript, smScriptAppFond ) }
  278.     kATSUSizeTag                = 262;                            {     Type:            Fixed     }
  279.                                                                 {     Default value:    GetScriptVariable( smSystemScript, smScriptAppFondSize )     }
  280.     kATSUColorTag                = 263;                            {     Type:            RGBColor     }
  281.                                                                 {     Default value:    (0, 0, 0) }
  282.     kATSULanguageTag            = 264;                            {     Type:            RegionCode     }
  283.                                                                 {     Default value:    GetScriptVariable( smSystemScript, smScriptLang ) }
  284.                                                                 {     Less common run tags  }
  285.     kATSUVerticalCharacterTag    = 265;                            {     Type:            ATSUVerticalCharacterType     }
  286.                                                                 {     Default value:    kATSUStronglyHorizontal }
  287.     kATSUImposeWidthTag            = 266;                            {     Type:            ATSUTextMeasurement }
  288.                                                                 {     Default value:    all glyphs use their own font defined advance widths }
  289.     kATSUBeforeWithStreamShiftTag = 267;                        {     Type:            Fixed }
  290.                                                                 {     Default value:    0 }
  291.     kATSUAfterWithStreamShiftTag = 268;                            {     Type:            Fixed }
  292.                                                                 {     Default value:    0 }
  293.     kATSUCrossStreamShiftTag    = 269;                            {     Type:            Fixed }
  294.                                                                 {     Default value:    0 }
  295.     kATSUTrackingTag            = 270;                            {     Type:            Fixed }
  296.                                                                 {     Default value:    0 }
  297.     kATSUHangingInhibitFactorTag = 271;                            {     Type:            Fract between 0 and 1 }
  298.                                                                 {     Default value:    0 }
  299.     kATSUKerningInhibitFactorTag = 272;                            {     Type:            Fract between 0 and 1 }
  300.                                                                 {     Default value:    0 }
  301.     kATSUDecompositionFactorTag    = 273;                            {     Type:            Fixed (-1.0 -> 1.0) }
  302.                                                                 {     Default value:    0 }
  303.     kATSUBaselineClassTag        = 274;                            {     Type:            BslnBaselineClass  (see SFNTLayoutTypes.h) }
  304.                                                                 {     Default value:    kBSLNNoBaselineOverride }
  305.     kATSUPriorityJustOverrideTag = 275;                            {     Type:            ATSJustPriorityWidthDeltaOverrides (see ATSLayoutTypes.h) }
  306.                                                                 {     Default value:    all zeros }
  307.     kATSUNoLigatureSplitTag        = 276;                            {     Type:            Boolean }
  308.                                                                 {     Default value:    false - ligatures and compound characters have divisable components. }
  309.     kATSUNoCaretAngleTag        = 277;                            {     Type:            Boolean }
  310.                                                                 {     Default value:    false - use the character's angularity to determine its boundaries }
  311.     kATSUSuppressCrossKerningTag = 278;                            {     Type:            Boolean }
  312.                                                                 {     Default value:    false - do not suppress automatic cross kerning (defined by font) }
  313.     kATSUNoOpticalAlignmentTag    = 279;                            {     Type:            Boolean }
  314.                                                                 {     Default value:    false - do not suppress character's automatic optical positional alignment }
  315.     kATSUForceHangingTag        = 280;                            {     Type:            Boolean }
  316.                                                                 {     Default value:    false - do not force the character's to hang beyond the line boundaries }
  317.     kATSUNoSpecialJustificationTag = 281;                        {     Type:            Boolean }
  318.                                                                 {     Default value:    false - perform post-compensation justification if needed }
  319.     kATSUMaxATSUITagValue        = 65535;                        {     This is the maximum Apple ATSUI reserved tag value.  Client defined tags must be larger. }
  320.  
  321. {******************************}
  322. {    Enumerations and constants    }
  323. {******************************}
  324. { Cursor movement }
  325.     kATSUByCharacter            = 0;
  326.     kATSUByCluster                = 1;
  327.     kATSUByWord                    = 2;
  328.  
  329. { Vertical text types }
  330.     kATSUStronglyHorizontal        = 0;
  331.     kATSUStronglyVertical        = 1;
  332.  
  333. { Line direction types (used for kATSULineDirectionTag values) }
  334.     kATSULeftToRightBaseDirection = 0;                            {     Impose left-to-right or top-to-bottom dominant direction  }
  335.     kATSURightToLeftBaseDirection = 1;                            {     Impose right-to-left or bottom-to-top dominant direction  }
  336.  
  337. { Style comparison types }
  338.     kATSUStyleUnequal            = 0;
  339.     kATSUStyleContains            = 1;
  340.     kATSUStyleEquals            = 2;
  341.     kATSUStyleContainedBy        = 3;
  342.  
  343. { LineFlushFactor convenience defined values }
  344.     kATSUStartAlignment            = $00000000;
  345.     kATSUEndAlignment            = $40000000;
  346.     kATSUCenterAlignment        = $20000000;
  347.  
  348. { LineJustificationFactor convenience defined values }
  349.     kATSUNoJustification        = $00000000;
  350.     kATSUFullJustification        = $40000000;
  351.  
  352. { Other constants    }
  353.     kATSUInvalidFontID            = 0;
  354.  
  355.  
  356.     kATSUUseLineControlWidth    = $7FFFFFFF;
  357.  
  358.  
  359.     kATSUUseGrafPortPenLoc        = $FFFFFFFF;
  360.     kATSUClearAll                = $FFFFFFFF;
  361.  
  362.  
  363.     kATSUFromTextBeginning        = $FFFFFFFF;
  364.     kATSUToTextEnd                = $FFFFFFFF;
  365.  
  366.  
  367. {**************}
  368. {    Functions    }
  369. {**************}
  370.  
  371. {    Basic style functions    }
  372. FUNCTION ATSUCreateStyle(VAR oStyle: ATSUStyle): OSStatus; C;
  373. FUNCTION ATSUCreateAndCopyStyle(iStyle: ATSUStyle; VAR oStyle: ATSUStyle): OSStatus; C;
  374. FUNCTION ATSUDisposeStyle(iStyle: ATSUStyle): OSStatus; C;
  375. FUNCTION ATSUSetStyleRefCon(iStyle: ATSUStyle; iRefCon: UInt32): OSStatus; C;
  376. FUNCTION ATSUGetStyleRefCon(iStyle: ATSUStyle; VAR oRefCon: UInt32): OSStatus; C;
  377.  
  378. {    Style comparison         }
  379. FUNCTION ATSUCompareStyles(iFirstStyle: ATSUStyle; iSecondStyle: ATSUStyle; VAR oComparison: ATSUStyleComparison): OSStatus; C;
  380. {    Attribute manipulations    }
  381. FUNCTION ATSUCopyAttributes(iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle): OSStatus; C;
  382. FUNCTION ATSUOverwriteAttributes(iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle): OSStatus; C;
  383. FUNCTION ATSUUnderwriteAttributes(iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle): OSStatus; C;
  384. {    Empty styles    }
  385. FUNCTION ATSUClearStyle(iStyle: ATSUStyle): OSStatus; C;
  386. FUNCTION ATSUStyleIsEmpty(iStyle: ATSUStyle; VAR isClear: BOOLEAN): OSStatus; C;
  387. {    Clipboard support    }
  388. FUNCTION ATSUCopyToHandle(iStyle: ATSUStyle; oStyleHandle: Handle): OSStatus; C;
  389. FUNCTION ATSUPasteFromHandle(iStyle: ATSUStyle; iStyleHandle: Handle): OSStatus; C;
  390. {    Get and set attributes }
  391. FUNCTION ATSUCalculateBaselineDeltas(iStyle: ATSUStyle; iBaselineClass: BslnBaselineClass; VAR oBaselineDeltas: BslnBaselineRecord): OSStatus; C;
  392. FUNCTION ATSUSetAttributes(iStyle: ATSUStyle; iAttributeCount: ItemCount; VAR iTag: ATSUAttributeTag; VAR iValueSize: ByteCount; VAR iValue: ATSUAttributeValuePtr): OSStatus; C;
  393. FUNCTION ATSUGetAttribute(iStyle: ATSUStyle; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr; VAR oActualValueSize: ByteCount): OSStatus; C;
  394. FUNCTION ATSUGetAllAttributes(iStyle: ATSUStyle; VAR oAttributeInfoArray: ATSUAttributeInfo; iTagValuePairArraySize: ItemCount; VAR oTagValuePairCount: ItemCount): OSStatus; C;
  395. FUNCTION ATSUClearAttributes(iStyle: ATSUStyle; iTagCount: ItemCount; VAR iTag: ATSUAttributeTag): OSStatus; C;
  396. {    Font features    }
  397. FUNCTION ATSUSetFontFeatures(iStyle: ATSUStyle; iFeatureCount: ItemCount; VAR iType: ATSUFontFeatureType; VAR iSelector: ATSUFontFeatureSelector): OSStatus; C;
  398. FUNCTION ATSUGetFontFeature(iStyle: ATSUStyle; iFeatureIndex: ItemCount; VAR oFeatureType: ATSUFontFeatureType; VAR oFeatureSelector: ATSUFontFeatureSelector): OSStatus; C;
  399. FUNCTION ATSUGetAllFontFeatures(iStyle: ATSUStyle; iMaximumFeatureCount: ItemCount; VAR oFeatureType: ATSUFontFeatureType; VAR oFeatureSelector: ATSUFontFeatureSelector; VAR oActualFeatureCount: ItemCount): OSStatus; C;
  400. FUNCTION ATSUClearFontFeatures(iStyle: ATSUStyle; iFeatureCount: ItemCount; VAR iType: ATSUFontFeatureType; VAR iSelector: ATSUFontFeatureSelector): OSStatus; C;
  401. {    Font variations    }
  402. FUNCTION ATSUSetVariations(iStyle: ATSUStyle; iVariationCount: ItemCount; VAR iAxis: ATSUFontVariationAxis; VAR iValue: ATSUFontVariationValue): OSStatus; C;
  403. FUNCTION ATSUGetFontVariationValue(iStyle: ATSUStyle; iATSUFontVariationAxis: ATSUFontVariationAxis; VAR oATSUFontVariationValue: ATSUFontVariationValue): OSStatus; C;
  404. FUNCTION ATSUGetAllFontVariations(iStyle: ATSUStyle; iVariationCount: ItemCount; VAR oVariationAxes: ATSUFontVariationAxis; VAR oATSUFontVariationValues: ATSUFontVariationValue; VAR oActualVariationCount: ItemCount): OSStatus; C;
  405. FUNCTION ATSUClearFontVariations(iStyle: ATSUStyle; iAxisCount: ItemCount; VAR iAxis: ATSUFontVariationAxis): OSStatus; C;
  406. {    Basic text-layout functions    }
  407. FUNCTION ATSUCreateTextLayout(VAR oTextLayout: ATSUTextLayout): OSStatus; C;
  408. FUNCTION ATSUCreateTextLayoutWithTextPtr(iText: ConstUniCharArrayPtr; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount; iNumberOfRuns: ItemCount; VAR iRunLengths: UniCharCount; VAR iStyles: ATSUStyle; VAR oTextLayout: ATSUTextLayout): OSStatus; C;
  409. FUNCTION ATSUCreateTextLayoutWithTextHandle(iText: UniCharArrayHandle; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount; iNumberOfRuns: ItemCount; VAR iRunLengths: UniCharCount; VAR iStyles: ATSUStyle; VAR oTextLayout: ATSUTextLayout): OSStatus; C;
  410. FUNCTION ATSUDisposeTextLayout(iTextLayout: ATSUTextLayout): OSStatus; C;
  411. FUNCTION ATSUSetTextLayoutRefCon(iTextLayout: ATSUTextLayout; iRefCon: UInt32): OSStatus; C;
  412. FUNCTION ATSUGetTextLayoutRefCon(iTextLayout: ATSUTextLayout; VAR oRefCon: UInt32): OSStatus; C;
  413. {    Text location    }
  414. FUNCTION ATSUSetTextPointerLocation(iTextLayout: ATSUTextLayout; iText: ConstUniCharArrayPtr; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount): OSStatus; C;
  415. FUNCTION ATSUSetTextHandleLocation(iTextLayout: ATSUTextLayout; iText: UniCharArrayHandle; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount): OSStatus; C;
  416. FUNCTION ATSUGetTextLocation(iTextLayout: ATSUTextLayout; VAR oText: UNIV Ptr; VAR oTextIsStoredInHandle: BOOLEAN; VAR oOffset: UniCharArrayOffset; VAR oTextLength: UniCharCount; VAR oTextTotalLength: UniCharCount): OSStatus; C;
  417. {    Text manipulation    }
  418. FUNCTION ATSUTextDeleted(iTextLayout: ATSUTextLayout; iDeletedRangeStart: UniCharArrayOffset; iDeletedRangeLength: UniCharCount): OSStatus; C;
  419. FUNCTION ATSUTextInserted(iTextLayout: ATSUTextLayout; iInsertionLocation: UniCharArrayOffset; iInsertionLength: UniCharCount): OSStatus; C;
  420. FUNCTION ATSUTextMoved(iTextLayout: ATSUTextLayout; iNewLocation: ConstUniCharArrayPtr): OSStatus; C;
  421. {    Layout controls    }
  422. FUNCTION ATSUCopyLayoutControls(iSource: ATSUTextLayout; iDest: ATSUTextLayout): OSStatus; C;
  423. FUNCTION ATSUSetLayoutControls(iLayout: ATSUTextLayout; iAttributeCount: ItemCount; VAR iTag: ATSUAttributeTag; VAR iValueSize: ByteCount; VAR iValue: ATSUAttributeValuePtr): OSStatus; C;
  424. FUNCTION ATSUGetLayoutControl(iLayout: ATSUTextLayout; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr; VAR oActualValueSize: ByteCount): OSStatus; C;
  425. FUNCTION ATSUGetAllLayoutControls(iLayout: ATSUTextLayout; VAR oAttributeInfoArray: ATSUAttributeInfo; iTagValuePairArraySize: ItemCount; VAR oTagValuePairCount: ItemCount): OSStatus; C;
  426. FUNCTION ATSUClearLayoutControls(iLayout: ATSUTextLayout; iTagCount: ItemCount; VAR iTag: ATSUAttributeTag): OSStatus; C;
  427.  
  428.  
  429. {    Style run processing    }
  430. FUNCTION ATSUSetRunStyle(iTextLayout: ATSUTextLayout; iStyle: ATSUStyle; iRunStart: UniCharArrayOffset; iRunLength: UniCharCount): OSStatus; C;
  431. FUNCTION ATSUGetRunStyle(iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; VAR oStyle: ATSUStyle; VAR oRunStart: UniCharArrayOffset; VAR oRunLength: UniCharCount): OSStatus; C;
  432. FUNCTION ATSUGetContinuousAttributes(iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; iLength: UniCharCount; oStyle: ATSUStyle): OSStatus; C;
  433. {    Drawing and measuring    }
  434. FUNCTION ATSUDrawText(iTextLayout: ATSUTextLayout; iLineOffset: UniCharArrayOffset; iLineLength: UniCharCount; iLocationX: ATSUTextMeasurement; iLocationY: ATSUTextMeasurement): OSStatus; C;
  435. FUNCTION ATSUMeasureText(iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iLineLength: UniCharCount; VAR oTextBefore: ATSUTextMeasurement; VAR oTextAfter: ATSUTextMeasurement; VAR oAscent: ATSUTextMeasurement; VAR oDescent: ATSUTextMeasurement): OSStatus; C;
  436. FUNCTION ATSUMeasureTextImage(iTextLayout: ATSUTextLayout; iLineOffset: UniCharArrayOffset; iLineLength: UniCharCount; iLocationX: ATSUTextMeasurement; iLocationY: ATSUTextMeasurement; VAR oTextImageRect: Rect): OSStatus; C;
  437. {    Highlighting    }
  438. FUNCTION ATSUHighlightText(iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iHighlightStart: UniCharArrayOffset; iHighlightLength: UniCharCount): OSStatus; C;
  439. FUNCTION ATSUUnhighlightText(iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iHighlightStart: UniCharArrayOffset; iHighlightLength: UniCharCount): OSStatus; C;
  440. FUNCTION ATSUGetTextHighlight(iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iHighlightStart: UniCharArrayOffset; iHighlightLength: UniCharCount; oHighlightRegion: RgnHandle): OSStatus; C;
  441. {    Hit-testing    }
  442. FUNCTION ATSUPositionToOffset(iTextLayout: ATSUTextLayout; iLocationX: ATSUTextMeasurement; iLocationY: ATSUTextMeasurement; VAR ioPrimaryOffset: UniCharArrayOffset; VAR oIsLeading: BOOLEAN; VAR oSecondaryOffset: UniCharArrayOffset): OSStatus; C;
  443. FUNCTION ATSUOffsetToPosition(iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; iIsLeading: BOOLEAN; VAR oMainCaret: ATSUCaret; VAR oSecondCaret: ATSUCaret; VAR oCaretIsSplit: BOOLEAN): OSStatus; C;
  444. {    Cursor movement    }
  445. FUNCTION ATSUNextCursorPosition(iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; VAR oNewOffset: UniCharArrayOffset): OSStatus; C;
  446. FUNCTION ATSUPreviousCursorPosition(iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; VAR oNewOffset: UniCharArrayOffset): OSStatus; C;
  447. FUNCTION ATSURightwardCursorPosition(iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; VAR oNewOffset: UniCharArrayOffset): OSStatus; C;
  448. FUNCTION ATSULeftwardCursorPosition(iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; VAR oNewOffset: UniCharArrayOffset): OSStatus; C;
  449. {    Line breaking    }
  450. FUNCTION ATSUBreakLine(iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iLineWidth: ATSUTextMeasurement; iUseAsSoftLineBreak: BOOLEAN; VAR oLineBreak: UniCharArrayOffset): OSStatus; C;
  451. FUNCTION ATSUSetSoftLineBreak(iTextLayout: ATSUTextLayout; iLineBreak: UniCharArrayOffset): OSStatus; C;
  452. FUNCTION ATSUGetSoftLineBreaks(iTextLayout: ATSUTextLayout; iRangeStart: UniCharArrayOffset; iRangeLength: UniCharCount; iMaximumBreaks: ItemCount; VAR oBreaks: UniCharArrayOffset; VAR oBreakCount: ItemCount): OSStatus; C;
  453. FUNCTION ATSUClearSoftLineBreaks(iTextLayout: ATSUTextLayout; iRangeStart: UniCharArrayOffset; iRangeLength: UniCharCount): OSStatus; C;
  454. {    Idle processing    }
  455. FUNCTION ATSUIdle(iTextLayout: ATSUTextLayout): OSStatus; C;
  456. {    Font matching    }
  457. FUNCTION ATSUMatchFontsToText(iTextLayout: ATSUTextLayout; iTextStart: UniCharArrayOffset; iTextLength: UniCharCount; VAR oFont: ATSUFontID; VAR oChangedOffset: UniCharArrayOffset; VAR oChangedLength: UniCharCount): OSStatus; C;
  458. FUNCTION ATSUSetTransientFontMatching(iTextLayout: ATSUTextLayout; iTransientFontMatching: BOOLEAN): OSStatus; C;
  459. FUNCTION ATSUGetTransientFontMatching(iTextLayout: ATSUTextLayout; VAR oTransientFontMatching: BOOLEAN): OSStatus; C;
  460. {    Font ID's    }
  461. FUNCTION ATSUFontCount(VAR oFontCount: ItemCount): OSStatus; C;
  462. FUNCTION ATSUGetFontIDs(VAR oFontIDs: ATSUFontID; iArraySize: ItemCount; VAR oFontCount: ItemCount): OSStatus; C;
  463. FUNCTION ATSUFONDtoFontID(iFONDNumber: INTEGER; iFONDStyle: ByteParameter; VAR oFontID: ATSUFontID): OSStatus; C;
  464. FUNCTION ATSUFontIDtoFOND(iFontID: ATSUFontID; VAR oFONDNumber: INTEGER; VAR oFONDStyle: Style): OSStatus; C;
  465. {    Font names    }
  466. FUNCTION ATSUCountFontNames(iFontID: ATSUFontID; VAR oFontNameCount: ItemCount): OSStatus; C;
  467. FUNCTION ATSUGetIndFontName(iFontID: ATSUFontID; iFontNameIndex: ItemCount; iMaximumNameLength: ByteCount; oName: Ptr; VAR oActualNameLength: ByteCount; VAR oFontNameCode: FontNameCode; VAR oFontNamePlatform: FontPlatformCode; VAR oFontNameScript: FontScriptCode; VAR oFontNameLenguage: FontLanguageCode): OSStatus; C;
  468. FUNCTION ATSUFindFontName(iFontID: ATSUFontID; iFontNameCode: FontNameCode; iFontNamePlatform: FontPlatformCode; iFontNameScript: FontScriptCode; iFontNameLanguage: FontLanguageCode; iMaximumNameLength: ByteCount; oName: Ptr; VAR oActualNameLength: ByteCount; VAR oFontNameIndex: ItemCount): OSStatus; C;
  469. FUNCTION ATSUFindFontFromName(iName: Ptr; iNameLength: ByteCount; iFontNameCode: FontNameCode; iFontNamePlatform: FontPlatformCode; iFontNameScript: FontScriptCode; iFontNameLanguage: FontLanguageCode; VAR oFontID: ATSUFontID): OSStatus; C;
  470. {    Font features    }
  471. FUNCTION ATSUCountFontFeatureTypes(iFont: ATSUFontID; VAR oTypeCount: ItemCount): OSStatus; C;
  472. FUNCTION ATSUCountFontFeatureSelectors(iFont: ATSUFontID; iType: ATSUFontFeatureType; VAR oSelectorCount: ItemCount): OSStatus; C;
  473. FUNCTION ATSUGetFontFeatureTypes(iFont: ATSUFontID; iMaximumTypes: ItemCount; VAR oTypes: ATSUFontFeatureType; VAR oActualTypeCount: ItemCount): OSStatus; C;
  474. FUNCTION ATSUGetFontFeatureSelectors(iFont: ATSUFontID; iType: ATSUFontFeatureType; iMaximumSelectors: ItemCount; VAR oSelectors: ATSUFontFeatureSelector; VAR oSelectorIsOnByDefault: BOOLEAN; VAR oActualSelectorCount: ItemCount; VAR oIsMutuallyExclusive: BOOLEAN): OSStatus; C;
  475. FUNCTION ATSUGetFontFeatureNameCode(iFont: ATSUFontID; iType: ATSUFontFeatureType; iSelector: ATSUFontFeatureSelector; VAR oNameCode: FontNameCode): OSStatus; C;
  476. {    Font variations    }
  477. FUNCTION ATSUCountFontVariations(iFont: ATSUFontID; VAR oVariationCount: ItemCount): OSStatus; C;
  478. FUNCTION ATSUGetIndFontVariation(iFont: ATSUFontID; iVariationIndex: ItemCount; VAR oATSUFontVariationAxis: ATSUFontVariationAxis; VAR oMinimumValue: ATSUFontVariationValue; VAR oMaximumValue: ATSUFontVariationValue; VAR oDefaultValue: ATSUFontVariationValue): OSStatus; C;
  479. FUNCTION ATSUGetFontVariationNameCode(iFont: ATSUFontID; iAxis: ATSUFontVariationAxis; VAR oNameCode: FontNameCode): OSStatus; C;
  480.  
  481. {    Font Instances    }
  482. FUNCTION ATSUCountFontInstances(iFont: ATSUFontID; VAR oInstances: ItemCount): OSStatus; C;
  483. FUNCTION ATSUGetFontInstance(iFont: ATSUFontID; iFontInstanceIndex: ItemCount; iMaximumVariations: ItemCount; VAR oAxes: ATSUFontVariationAxis; VAR oValues: ATSUFontVariationValue; VAR oActualVariationCount: ItemCount): OSStatus; C;
  484. FUNCTION ATSUGetFontInstanceNameCode(iFont: ATSUFontID; iInstanceIndex: ItemCount; VAR oNameCode: FontNameCode): OSStatus; C;
  485. {$ALIGN RESET}
  486. {$POP}
  487.  
  488. {$SETC UsingIncludes := ATSUnicodeIncludes}
  489.  
  490. {$ENDC} {__ATSUNICODE__}
  491.  
  492. {$IFC NOT UsingIncludes}
  493.  END.
  494. {$ENDC}
  495.